#pragma once
#include "dbmain.h"

class CBeam :	public AcDbEntity
{
public:
	ACRX_DECLARE_MEMBERS(CBeam);

	CBeam(void);
public:
	CBeam(const AcGePoint3d& start, const AcGePoint3d& end,int nwidth);
public:
	~CBeam(void);
    void PerformExtend();
	virtual Adesk::Boolean worldDraw( AcGiWorldDraw* mode);
	virtual Acad::ErrorStatus getGeomExtents(AcDbExtents& extents) const;
	virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform);
	virtual Acad::ErrorStatus  getTransformedCopy(const AcGeMatrix3d& xform, AcDbEntity*& ent) const;
	virtual Acad::ErrorStatus   getGripPoints( AcGePoint3dArray& gripPoints, AcDbIntArray&  osnapModes,AcDbIntArray&  geomIds) const;
	virtual Acad::ErrorStatus moveGripPointsAt(const AcDbIntArray& indices,const AcGeVector3d& offset);
	virtual Acad::ErrorStatus 	dwgInFields(AcDbDwgFiler* filer);
	virtual Acad::ErrorStatus 	dwgOutFields(AcDbDwgFiler* filer) const;
	virtual Acad::ErrorStatus 	dxfInFields(AcDbDxfFiler* filer);
	virtual Acad::ErrorStatus 	dxfOutFields(AcDbDxfFiler* filer) const;
	virtual Acad::ErrorStatus  explode(AcDbVoidPtrArray& entitySet) const;
	virtual Acad::ErrorStatus	extend(Adesk::Boolean extendStart,const AcGePoint3d& toPoint);
	virtual Acad::ErrorStatus 	getStretchPoints(AcGePoint3dArray& stretchPoints) const;
	virtual Acad::ErrorStatus 	moveStretchPointsAt(const AcDbIntArray& indices,const AcGeVector3d& offset);
	virtual Acad::ErrorStatus  getOsnapPoints(AcDb::OsnapMode osnapMode,int gsSelectionMark,const AcGePoint3d& pickPoint,	const AcGePoint3d& lastPoint,
		const AcGeMatrix3d& viewXform,	AcGePoint3dArray& snapPoints,AcDbIntArray& geomIds,	const AcGeMatrix3d& insertionMat) const;
	virtual Acad::ErrorStatus 	intersectWith(	const AcDbEntity* ent,	AcDb::Intersect intType, AcGePoint3dArray& points,int thisGsMarker = 0, 	int otherGsMarker = 0) const;

public:
	AcGePoint3d m_stPoint;
	AcGePoint3d m_endPoint;
    double m_nWidth;
};
